#ifndef SPINLOCK_H
#define SPINLOCK_H

#include "types.h"

struct spinlock {
  uint64 locked;
  char *name;
};

void initlock(struct spinlock *, char *);
void acquire(struct spinlock *);
void release(struct spinlock *);
int holding(struct spinlock *);

#endif